<?php

namespace App\Http\Traits;

use App\Models\Centers;
use App\Models\User;
use Illuminate\Support\Facades\Auth;

trait CurrentCenters
{
    public array $currentCenters1;

    public function __construct()
    {
        $userId = auth()->user();



        dump($userId);
        if ($userId === 1) {
            dump(1);
            dump(Centers::all()->pluck('id')->get());
        } else {
            dump(2);
            $centers = Centers::where('user_id', $userId);
            dump($centers);
        }


    }


}
